input space
Understanding the Importance of Massive Activations through Adversarial Robustness
Fahradyan, Tigran, Ali, Riccardo, Calvo-Ordoñez, Sergio, Hernández-Lobato, José Miguel, Liò, Pietro, Arroyo, Álvaro
ABSTRACT A common occurrence in Large Language Models (LLMs) is the emergence of socalled massive activations. This phenomenon is well known in the literature and has been connected to attention sinks, representational compression, as well as signal propagation. However, the reasons and consequences for their appearance are not yet well understood. In this paper, we explain the role of massive activations in deep learning by showing that they are connected to the region migration phenomenon in delayed robustness. Under the spline theoretic interpretation of deep networks, we show that massive activations push the representations away from the nonlinearity boundaries of the network, decreasing the complexity of its input-output map around data points. Furthermore, we uncover for the first time that this phenomenon is not unique to transformers and actually appears in a number of common architectures performing simple supervised learning tasks. We consistently observe that massive activations and region migration co-occur with adversarial robustness. Furthermore, we illustrate that this connection holds in the large-scale pretraining of LLMs by showing that the rise of massive activations in LLMs closely tracks the adversarial accuracy of the model under perturbations of the token embeddings. Code is available here. 1 INTRODUCTION Despite their remarkable success, the inner workings of neural networks remain poorly understood, giving rise to surprising phenomena that challenge our understanding of how they learn. One such phenomenon that recently gained traction in the context of LLMs is the so-called massive activations (Sun et al., 2024). These are a few activations in the hidden representation of neural networks that grow multiple orders of magnitude larger than the others. These activations rise in early layers and persist through the network via the residual stream, until disappearing near the output.
Micro Operational Robustness of LLMs on Code Generation
Paul, Debalina Ghosh, Zhu, Hong, Bayley, Ian
It is now common practice in software development for large language models (LLMs) to be used to generate program code. It is desirable to evaluate the robustness of LLMs for this usage. This paper is concerned in particular with how sensitive LLMs are to variations in descriptions of the coding tasks. However, existing techniques for evaluating this robustness are unsuitable for code generation because the input data space of natural language (NL) descriptions is discrete and sparse. To address this problem, we propose a robustness evaluation method called scenario domain analysis, which aims to find the expected minimal change in the NL descriptions of coding tasks that would cause the LLMs to produce incorrect outputs. We have formally proved the theoretical properties of the method and also conducted extensive experiments to evaluate the robustness of four state-of-the-art LLMs: Gemini-pro, Codex, Llamma2 and Falcon 7B, and have found that we are able to rank these with confidence from best to worst. Moreover, we have also studied how robustness varies in different scenarios, including the variations with the topic of the coding task and with the complexity of its sample solution, and found that robustness is lower for more complex tasks and also lower for more advanced topics, such as multi-threading and data structures.
FRInGe: Distribution-Space Integrated Gradients with Fisher--Rao Geometry
Martino, Gabriele, Tschiatschek, Sebastian
Although gradient-based attribution methods are model-faithful and scalable, a prominent variant, Integrated Gradients (IG), suffers from high sensitivity to design choices, particularly in baseline selection, path formulation, and discretization, as well as gradient saturation. To address these limitations, we propose Fisher--Rao Integrated Gradients (FRInGe), which defines both the reference and integration paths in the predictive distribution space. FRInGe replaces input baselines with a maximum-entropy predictive reference and follows a Fisher--Rao geodesic on the probability simplex. The corresponding input-space trajectory is realized through the pullback Fisher metric and stabilized by Kullback--Leibler (KL) and Euclidean trust regions; attributions are obtained by integrating input gradients along this trajectory. We further derive FRInGe-B, a variant that binarizes the predictive probability distribution, removing the computationally expensive Fisher products of FRInGe. Across six ImageNet architectures, FRInGe most clearly improves Magnitude Aligned Scoring (MAS), while remaining competitive on perturbation area-under-the-curve (AUC) metrics and infidelity.
Testing Neural Networks via Bayesian-Guided Exploration of Decision Landscapes
Duan, Bin, Che, Meiru, Yang, Guowei
As neural networks are increasingly deployed in safety-critical domains, testing is essential to evaluate and improve their reliability. Existing testing methods, whether black-box or white-box, primarily use global mutation or coverage-guided strategies, both of which struggle to efficiently uncover diverse model failures while remaining proximate to the original data distribution and semantics. We propose BayesWarp, a testing framework that addresses this limitation by mutating decision-critical input regions identified via interpretable saliency techniques and adaptively guiding the testing process using an uncertainty-aware Bayesian Optimization strategy, enabling the discovery of diverse failures while preserving distributional and semantic proximity to the original data. Evaluation on MNIST, CIFAR-10, and ImageNet across six neural network models shows that BayesWarp improves failure discovery, failure diversity, test case quality, and critical neuron coverage under a fixed mutation budget. These results demonstrate that BayesWarp improves testing effectiveness. Moreover, fine-tuning with the generated failure cases leads to improvements in model performance.
Robust Deep Prototype Classifiers via Lipschitz Training
Khan, Adia Khalid, Gehring, Lukas, Paaßen, Benjamin
Robustness and interpretability are interrelated and desirable properties of machine learning models. A model that changes its prediction under imperceptible perturbations behaves inconsistently with human-recognizable features and, hence, is not interpretable. Prototype-based classifiers such as Generalized Learning Vector Quantization address both at once. They are interpretable by construction because they make the decision by comparing the input to the prototypical example; and their hypothesis margin yields a closed form robustness certificate. However, on high-dimensional data, these shallow models need deep embedding networks to achieve high accuracy, and this voids the robustness certificate. The margin is a statement about distances in the embedding space, and an unconstrained network can map an arbitrarily small input perturbation to arbitrarily large attacks in the embedding space. We close this gap with a theorem: if the embedding network is locally L-Lipschitz around a point, and the classifier is ε-robust around its embedding, then the full model is ε/L-robust in the input space. Based on this, we propose a Lipschitz training scheme to achieve L-Lipschitz properties for embedding networks. We evaluate three classification heads (linear, linear Support Vector Machine, and GLVQ) crossed with two embedding networks (standard and Lipschitz-constrained) on MNIST, CIFAR-10, and Imagenette-160, under FGS, PGD and C\&W attacks. The evaluation results show that combining a prototype-based head with a Lipschitz-constrained embedding provides the strongest robustness. This suggests that the Lipschitz constraint provides an additional robustness benefit in addition to the advantage provided by the prototype-based head. Since the Lipschitz constraint is enforced by sampling rather than by construction, the reported robustness is empirical rather than certified.
Latent Anchor-Driven Test Generation for Deep Neural Networks
Duan, Bin, Dwyer, Matthew B., Yang, Guowei
Deep Neural Networks (DNNs) are increasingly being deployed in security-critical and safety-sensitive applications, which makes rigorous testing essential to identify and mitigate model weaknesses. Existing DNN testing approaches explore either the input space or a learned latent space. While latent-space generation can better maintain plausibility than direct input-space mutation, current methods still face a trade-off among exploration controllability, failure diversity, and seed-relative semantic drift. To overcome these limitations, we propose Latte, a black-box testing framework that generates semantically proximate, diverse, and fault-revealing test cases by leveraging the latent space. Specifically, Latte encodes each input seed with a pre-trained VQ-VAE and performs a seed-centered, one-step latent mutation along directions defined by anchors sampled from alternative classes, followed by quantization and decoding back to the input space. This explores local neighborhoods around each seed within the learned latent manifold, resulting in a larger number and broader diversity of oracle-triggering prediction discrepancies under the same budget. We evaluated Latte on 5 datasets and 10 DNN models in single-model and multi-model testing scenarios. Across the evaluated datasets and models, Latte improves fault exposure and behavioral diversity under matched testing budgets. Under the single-model setting, it also maintains low seed-relative semantic drift with respect to the source seeds.
How to Achieve the Intended Aim of Deep Clustering Now, without Deep Learning
Ting, Kai Ming, Xu, Wei-Jie, Zhang, Hang
Abstractcused on different methods to learn a good latent representation for clustering, for example, DEC and IDEC emDeep clustering (DC) is often quoted to have ploy autoencoders to learn low-dimensional data embeda key advantage over k-means clustering. Yet, this advantage is often demonstrated using imdings (Xie et al., 2016; Guo et al., 2017), while Contrastive age datasets only, and it is unclear whether it adClustering (CC) leverages a contrastive learning paradigm to learn both feature representations and cluster representadresses the fundamental limitations of k-means tions (Li et al., 2021). Deep Embedded Clustering (DEC) learns a latent representation via an autoencoder Beginning with the age-old definition of clustering, we unand performs clustering based on a k-means-likecover that DC has implicitly employed the same definition procedure, while the optimization is conductedwhich has one critical deficiency: The definition does not in an end-to-end manner. This paper investigatesspecify the characteristics of the clusters that enable one whether the deep-learned representation has en-to assess the'goodness' of the clusters produced from a abled DEC to overcome the known fundamentalclustering method. Instead, the definition demands a pointlimitations of k-means clustering, i.e., its inabil-to-point similarity measure to be used to find similar points ity to discover clusters of arbitrary shapes, var-in a cluster. This has influenced how a clustering method is ied sizes and densities. Our investigations ondesigned, including DC. DEC have a wider implication on deep clusterThe inadequacy of the age-old definition has prompted us ing methods in general. Notably, none of these methods exploit the underlying data distribution. These allow us to examine the fundamental limitations of DC.
On the Applicability of Safety Nets: A Safety-By-Design Solution for Certifying Neural Networks
Christensen, Johann Maximilian, Stefani, Thomas, Hoemann, Elena, Köster, Frank, Hallerbach, Sven
The integration of Artificial Intelligence (AI) in safety-critical aviation systems presents significant challenges for certification and deployment. Aviation, often regarded as the safest form of transportation, relies on numerous safety-critical systems. For future safety-critical AI-based systems, EASA requires a Safety-by-Design approach, which can be achieved by using Safety Nets that combine neural network compression with lookup tables to ensure 100 % correct runtime behavior across the discretized operational design domain. Although Safety Nets have been studied, no comprehensive study of their performance characteristics and system design trade-offs has been conducted. This work presents the first systematic analysis of the trade-off between neural network and lookup table size in Safety Nets. By systematically comparing neural networks with diverse architectures, this study identifies optimal design parameters that minimize overall storage and memory requirements while maintaining certification compliance. Results demonstrate that architectures with 3 to 5 hidden layers, each with approximately 50 to 100 nodes, combined with one-hot encoding, achieve the best balance. In these configurations, neural networks accurately represent at least 97 % of the data, while compact lookup tables handle the remaining errors. The resulting Safety Nets reduce the system size by almost three orders of magnitude, fitting within the memory budget of current avionics hardware while guaranteeing 100 % correct outputs across the entire discretized input space, as required by EASA guidelines. This work provides the first-ever open-source implementation of Safety Nets for HCAS and VCAS with replicable results, demonstrating a practical pathway toward certifiable AI-based systems in aviation and establishing Safety Nets as a viable Safety-by-Design solution for safety-critical applications.
Uncertainty Quantification of Engineering Structures by Polynomial Chaos Expansion and Multivariate Active Learning
Lu, Qitian, Jafari-Asl, Jafar, Spyridis, Panagiotis, Novak, Lukas
In many engineering applications, a single high-fidelity model produces multiple quantities of interest (QoIs) under the same input parameters, e.g. finite element models of complex physical systems. To alleviate the high computational cost of direct model evaluations, surrogate models are widely used to construct efficient approximations of model responses. Naturally, the accuracy of surrogates strongly depends on the quality of the experimental design (ED). However, a single ED may not provide an adequate representation for all outputs simultaneously, especially when different outputs exhibit varying sensitivities to the input variables. A straightforward solution is to perform separate sampling for each output, but this results in increased sampling complexity and computational cost. From a statistical perspective, such an approach also ignores potential correlations among all outputs and may compromise data consistency. To address this issue, an adaptive sequential sampling method for constructing polynomial chaos expansion surrogate models is generalized for vector valued QoIs. The method sequentially selects new samples from a candidate pool based on their local contribution to the output variance, while balancing distance-based exploration of the input space and exploitation of aggregated variance information across all outputs. Its performance is compared with non-sequential Latin Hypercube Sampling through several numerical examples from engineering problems. Numerical results demonstrate that the proposed strategy improves both surrogate accuracy and stability, and provides a more reliable estimation of second-order statistics.
Upper Bounds on the Generalization Error of Deep Learning Models via Local Robustness and Stability
Nuhu, Abdul-Rauf, Kebria, Parham M., Hemmati, Vahid, Mahmoud, Mahmoud N., Tunstel, Edward, Homaifar, Abdollah
Generalization is a critical property of data-driven models, particularly deep learning models deployed in safety-critical applications. Robustness-based generalization bounds have gained attention as a principled way to link robustness properties to generalization performance, often in a data-dependent manner. However, most existing bounds suffer from vacuousness in practical settings, yielding loose upper bounds that greatly exceed the actual error rates and limiting their usefulness for real-world evaluation. While this issue is often attributed to the uncertainty term, a substantial part of the problem originates from the robustness term itself, particularly for the 0-1 loss. Existing approaches typically treat the robustness term as a global measure, ignoring its variation across different sub-regions of the input space. In this work, we propose a generalization bound that addresses this limitation by scaling the robustness term according to the number of stable and unstable samples within each sub-region. Our bounds incorporate both data- and model-dependent factors while maintaining practical relevance (yielding tighter upper bounds on true error). Experiments on models trained on the ImageNet dataset show that our bounds remain consistently non-vacuous and achieve the tightest estimates among existing methods, closely aligning with empirical performance across a range of robust deep neural networks.